Making references to properties/methods

You can reference the properties of Knowledge Explorer objects within commands by using the syntax:

<ExplorerObjectName.PropertyName>

For example, with a List attribute called Grade that has a value of Senior_Manager:

@Assign Grade.default = 'Senior_Manager'

would set the default property of this attribute to the given value.

SHORTCUT: When you type in an object name followed by a period in the procedure editor, a pop up window will appear automatically after a moment. This shows the properties and methods that you can select. You could also press CTRL+SPACE to get this pop up.

Note these important points:

·Property names are case sensitive. e.g. Grade.defaultmode would give an 'unknown variable' run time error if the property name was defaultMode.

·The True and False Boolean properties are set without any need for the use of quotes, as they are reserved words. e.g. @Assign Grade.allowBlank = True is correct and not = 'True'.

·The run time can only trap basic syntax errors such as the above examples. It is up to the developer to ensure that they do not make assignments that are unsuitable or are not practical. Great care should be taken when setting properties. Note that you can get situations where debugging in the developer environment can become extremely difficult when what you see as 'current' property settings may not be what is now actually happening at run time.

Using Dialog properties

Dialog properties can also be referenced in a similar way to all properties. This can be used quite inventively. For instance, you could set properties to implement multiple graphical dialogs that are of a consistent design.

For Example, a dialog object called Get_Services has a Label control called control1 and a List attribute input control called control2.

@Assign Get_Services.control1.Caption = 'What is your job? '

@Assign Get_Services.control2.TiedItem = 'Grade'

These two commands could change the prompt on the dialog and change the attribute being captured to one called Grade.

This enables you to have one dialog object with its standard design that can be quickly changed centrally. The relevant prompt text and tied item can then be assigned before the dialog box is called upon. If a help button is used, the topic number (Context_ID) may also need to be assigned prior to being called.

In practice, the developer could create one style for List attributes, one style for Numeric input, one style for Dates, etc.

Note the names of controls (control1, control2, etc.) are set purely by the order in which the controls are created. If you delete a control its number would no longer be used and new controls are just added with the next number available.

Making references to methods

Methods as well as properties can also be used via the same syntax, and selected from the same pop-up list (CTRL+SPACE). The methods available will vary depending upon the type of object.